<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RDoc::CodeObject - rdoc: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="Text.html">RDoc::Text</a>
    <li><a class="include" href="Generator/Markup.html">RDoc::Generator::Markup</a>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-comment-3D">#comment=</a>
    <li ><a href="#method-i-display-3F">#display?</a>
    <li ><a href="#method-i-document_children-3D">#document_children=</a>
    <li ><a href="#method-i-document_self-3D">#document_self=</a>
    <li ><a href="#method-i-documented-3F">#documented?</a>
    <li ><a href="#method-i-done_documenting-3D">#done_documenting=</a>
    <li ><a href="#method-i-each_parent">#each_parent</a>
    <li ><a href="#method-i-file_name">#file_name</a>
    <li ><a href="#method-i-force_documentation-3D">#force_documentation=</a>
    <li ><a href="#method-i-full_name-3D">#full_name=</a>
    <li ><a href="#method-i-ignore">#ignore</a>
    <li ><a href="#method-i-ignored-3F">#ignored?</a>
    <li ><a href="#method-i-options">#options</a>
    <li ><a href="#method-i-parent">#parent</a>
    <li ><a href="#method-i-parent_file_name">#parent_file_name</a>
    <li ><a href="#method-i-parent_name">#parent_name</a>
    <li ><a href="#method-i-record_location">#record_location</a>
    <li ><a href="#method-i-section">#section</a>
    <li ><a href="#method-i-start_doc">#start_doc</a>
    <li ><a href="#method-i-stop_doc">#stop_doc</a>
    <li ><a href="#method-i-store-3D">#store=</a>
    <li ><a href="#method-i-suppress">#suppress</a>
    <li ><a href="#method-i-suppressed-3F">#suppressed?</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RDoc::CodeObject">
    <h1 id="class-RDoc::CodeObject" class="class">
      class RDoc::CodeObject
    </h1>

    <section class="description">
    
<p>Base class for the <a href="../RDoc.html"><code>RDoc</code></a> code tree.</p>

<p>We contain the common stuff for contexts (which are containers) and other elements (methods, attributes and so on)</p>

<p>Here’s the tree of the <a href="CodeObject.html"><code>CodeObject</code></a> subclasses:</p>
<ul><li>
<p><a href="Context.html"><code>RDoc::Context</code></a></p>
<ul><li>
<p><a href="TopLevel.html"><code>RDoc::TopLevel</code></a></p>
</li><li>
<p><a href="ClassModule.html"><code>RDoc::ClassModule</code></a></p>
<ul><li>
<p><a href="AnonClass.html"><code>RDoc::AnonClass</code></a> (never used so far)</p>
</li><li>
<p><a href="NormalClass.html"><code>RDoc::NormalClass</code></a></p>
</li><li>
<p><a href="NormalModule.html"><code>RDoc::NormalModule</code></a></p>
</li><li>
<p><a href="SingleClass.html"><code>RDoc::SingleClass</code></a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="MethodAttr.html"><code>RDoc::MethodAttr</code></a></p>
<ul><li>
<p><a href="Attr.html"><code>RDoc::Attr</code></a></p>
</li><li>
<p><a href="AnyMethod.html"><code>RDoc::AnyMethod</code></a></p>
<ul><li>
<p><a href="GhostMethod.html"><code>RDoc::GhostMethod</code></a></p>
</li><li>
<p><a href="MetaMethod.html"><code>RDoc::MetaMethod</code></a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Alias.html"><code>RDoc::Alias</code></a></p>
</li><li>
<p><a href="Constant.html"><code>RDoc::Constant</code></a></p>
</li><li>
<p><a href="Mixin.html"><code>RDoc::Mixin</code></a></p>
<ul><li>
<p><a href="Require.html"><code>RDoc::Require</code></a></p>
</li><li>
<p><a href="Include.html"><code>RDoc::Include</code></a></p>
</li></ul>
</li></ul>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-comment" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">comment</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Our comment</p>
              </div>
            </div>
          <div id="attribute-i-document_children" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">document_children</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Do we document our children?</p>
              </div>
            </div>
          <div id="attribute-i-document_self" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">document_self</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Do we document ourselves?</p>
              </div>
            </div>
          <div id="attribute-i-done_documenting" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">done_documenting</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Are we done documenting (ie, did we come across a :enddoc:)?</p>
              </div>
            </div>
          <div id="attribute-i-file" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">file</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Which file this code object was defined in</p>
              </div>
            </div>
          <div id="attribute-i-force_documentation" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">force_documentation</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Force documentation of this <a href="CodeObject.html"><code>CodeObject</code></a></p>
              </div>
            </div>
          <div id="attribute-i-line" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">line</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>Line in <a href="CodeObject.html#attribute-i-file"><code>file</code></a> where this <a href="CodeObject.html"><code>CodeObject</code></a> was defined</p>
              </div>
            </div>
          <div id="attribute-i-metadata" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">metadata</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Hash of arbitrary metadata for this <a href="CodeObject.html"><code>CodeObject</code></a></p>
              </div>
            </div>
          <div id="attribute-i-parent" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">parent</span><span
                class="attribute-access-type">[W]</span>
            </div>

            <div class="method-description">
              <p>Sets the parent <a href="CodeObject.html"><code>CodeObject</code></a></p>
              </div>
            </div>
          <div id="attribute-i-received_nodoc" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">received_nodoc</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>Did we ever receive a <code>:nodoc:</code> directive?</p>
              </div>
            </div>
          <div id="attribute-i-section" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">section</span><span
                class="attribute-access-type">[W]</span>
            </div>

            <div class="method-description">
              <p>Set the section this <a href="CodeObject.html"><code>CodeObject</code></a> is in</p>
              </div>
            </div>
          <div id="attribute-i-store" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">store</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>The <a href="Store.html"><code>RDoc::Store</code></a> for this object.</p>
              </div>
            </div>
          <div id="attribute-i-viewer" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">viewer</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>We are the model of the code, but we know that at some point we will be worked on by viewers. By implementing the Viewable protocol, viewers can associated themselves with these objects.</p>
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Creates a new <a href="CodeObject.html"><code>CodeObject</code></a> that will document itself and its children</p>

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
  <span class="ruby-ivar">@metadata</span>         = {}
  <span class="ruby-ivar">@comment</span>          = <span class="ruby-string">&#39;&#39;</span>
  <span class="ruby-ivar">@parent</span>           = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@parent_name</span>      = <span class="ruby-keyword">nil</span> <span class="ruby-comment"># for loading</span>
  <span class="ruby-ivar">@parent_class</span>     = <span class="ruby-keyword">nil</span> <span class="ruby-comment"># for loading</span>
  <span class="ruby-ivar">@section</span>          = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@section_title</span>    = <span class="ruby-keyword">nil</span> <span class="ruby-comment"># for loading</span>
  <span class="ruby-ivar">@file</span>             = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@full_name</span>        = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@store</span>            = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@track_visibility</span> = <span class="ruby-keyword">true</span>

  <span class="ruby-identifier">initialize_visibility</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-comment-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">comment=</span><span
                                class="method-args">(comment)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Replaces our comment with <code>comment</code>, unless it is empty.</p>

                              <div class="method-source-code" id="comment-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 135</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">comment=</span>(<span class="ruby-identifier">comment</span>)
  <span class="ruby-ivar">@comment</span> = <span class="ruby-keyword">case</span> <span class="ruby-identifier">comment</span>
             <span class="ruby-keyword">when</span> <span class="ruby-constant">NilClass</span>               <span class="ruby-keyword">then</span> <span class="ruby-string">&#39;&#39;</span>
             <span class="ruby-keyword">when</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Markup</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">comment</span>
             <span class="ruby-keyword">when</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Comment</span>          <span class="ruby-keyword">then</span> <span class="ruby-identifier">comment</span>.<span class="ruby-identifier">normalize</span>
             <span class="ruby-keyword">else</span>
               <span class="ruby-keyword">if</span> <span class="ruby-identifier">comment</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">comment</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">then</span>
                 <span class="ruby-identifier">normalize_comment</span> <span class="ruby-identifier">comment</span>
               <span class="ruby-keyword">else</span>
                 <span class="ruby-comment"># HACK correct fix is to have #initialize create @comment</span>
                 <span class="ruby-comment">#      with the correct encoding</span>
                 <span class="ruby-keyword">if</span> <span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@comment</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@comment</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">then</span>
                   <span class="ruby-ivar">@comment</span> = <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Encoding</span>.<span class="ruby-identifier">change_encoding</span> <span class="ruby-ivar">@comment</span>, <span class="ruby-identifier">comment</span>.<span class="ruby-identifier">encoding</span>
                 <span class="ruby-keyword">end</span>
                 <span class="ruby-ivar">@comment</span>
               <span class="ruby-keyword">end</span>
             <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-display-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">display?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Should this <a href="CodeObject.html"><code>CodeObject</code></a> be displayed in output?</p>

<p>A code object should be displayed if:</p>
<ul><li>
<p>The item didn’t have a nodoc or wasn’t in a container that had nodoc</p>
</li><li>
<p>The item wasn’t ignored</p>
</li><li>
<p>The item has documentation and was not suppressed</p>
</li></ul>

                              <div class="method-source-code" id="display-3F-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 163</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">display?</span>
  <span class="ruby-ivar">@document_self</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">not</span> <span class="ruby-ivar">@ignored</span> <span class="ruby-keyword">and</span>
    (<span class="ruby-identifier">documented?</span> <span class="ruby-keyword">or</span> <span class="ruby-keyword">not</span> <span class="ruby-ivar">@suppressed</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-document_children-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">document_children=</span><span
                                class="method-args">(document_children)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Enables or disables documentation of this CodeObject’s children unless it has been turned off by :enddoc:</p>

                              <div class="method-source-code" id="document_children-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 172</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">document_children=</span>(<span class="ruby-identifier">document_children</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>

  <span class="ruby-ivar">@document_children</span> = <span class="ruby-identifier">document_children</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@done_documenting</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-document_self-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">document_self=</span><span
                                class="method-args">(document_self)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Enables or disables documentation of this <a href="CodeObject.html"><code>CodeObject</code></a> unless it has been turned off by :enddoc:.  If the argument is <code>nil</code> it means the documentation is turned off by <code>:nodoc:</code>.</p>

                              <div class="method-source-code" id="document_self-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 183</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">document_self=</span>(<span class="ruby-identifier">document_self</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@done_documenting</span>

  <span class="ruby-ivar">@document_self</span> = <span class="ruby-identifier">document_self</span>
  <span class="ruby-ivar">@received_nodoc</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">document_self</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-documented-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">documented?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Does this object have a comment with content or is <a href="CodeObject.html#attribute-i-received_nodoc"><code>received_nodoc</code></a> true?</p>

                              <div class="method-source-code" id="documented-3F-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 194</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">documented?</span>
  <span class="ruby-ivar">@received_nodoc</span> <span class="ruby-keyword">or</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@comment</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-done_documenting-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">done_documenting=</span><span
                                class="method-args">(value)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Turns documentation on/off, and turns on/off <a href="CodeObject.html#attribute-i-document_self"><code>document_self</code></a> and <a href="CodeObject.html#attribute-i-document_children"><code>document_children</code></a>.</p>

<p>Once documentation has been turned off (by <code>:enddoc:</code>), the object will refuse to turn <a href="CodeObject.html#attribute-i-document_self"><code>document_self</code></a> or <a href="CodeObject.html#attribute-i-document_children"><code>document_children</code></a> on, so <code>:doc:</code> and <code>:start_doc:</code> directives will have no effect in the current file.</p>

                              <div class="method-source-code" id="done_documenting-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 207</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">done_documenting=</span>(<span class="ruby-identifier">value</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>
  <span class="ruby-ivar">@done_documenting</span>  = <span class="ruby-identifier">value</span>
  <span class="ruby-ivar">@document_self</span>     = <span class="ruby-operator">!</span><span class="ruby-identifier">value</span>
  <span class="ruby-ivar">@document_children</span> = <span class="ruby-ivar">@document_self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-each_parent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">each_parent</span><span
                                class="method-args">() { |code_object| ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Yields each parent of this <a href="CodeObject.html"><code>CodeObject</code></a>.  See also <a href="ClassModule.html#method-i-each_ancestor"><code>RDoc::ClassModule#each_ancestor</code></a></p>

                              <div class="method-source-code" id="each_parent-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 218</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">each_parent</span>
  <span class="ruby-identifier">code_object</span> = <span class="ruby-keyword">self</span>

  <span class="ruby-keyword">while</span> <span class="ruby-identifier">code_object</span> = <span class="ruby-identifier">code_object</span>.<span class="ruby-identifier">parent</span> <span class="ruby-keyword">do</span>
    <span class="ruby-keyword">yield</span> <span class="ruby-identifier">code_object</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-file_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">file_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>File name where this <a href="CodeObject.html"><code>CodeObject</code></a> was found.</p>

<p>See also <a href="Context.html#attribute-i-in_files"><code>RDoc::Context#in_files</code></a></p>

                              <div class="method-source-code" id="file_name-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 233</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">file_name</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@file</span>

  <span class="ruby-ivar">@file</span>.<span class="ruby-identifier">absolute_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-force_documentation-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">force_documentation=</span><span
                                class="method-args">(value)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Force the documentation of this object unless documentation has been turned off by :enddoc:</p>

                              <div class="method-source-code" id="force_documentation-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 245</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">force_documentation=</span>(<span class="ruby-identifier">value</span>)
  <span class="ruby-ivar">@force_documentation</span> = <span class="ruby-identifier">value</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@done_documenting</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_name-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_name=</span><span
                                class="method-args">(full_name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Sets the full_name overriding any computed full name.</p>

<p>Set to <code>nil</code> to clear RDoc’s cached value</p>

                              <div class="method-source-code" id="full_name-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 254</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_name=</span> <span class="ruby-identifier">full_name</span>
  <span class="ruby-ivar">@full_name</span> = <span class="ruby-identifier">full_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-ignore" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">ignore</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Use this to ignore a <a href="CodeObject.html"><code>CodeObject</code></a> and all its children until found again (<a href="CodeObject.html#method-i-record_location"><code>record_location</code></a> is called).  An ignored item will not be displayed in documentation.</p>

<p>See github issue #55</p>

<p>The ignored status is temporary in order to allow implementation details to be hidden.  At the end of processing a file <a href="../RDoc.html"><code>RDoc</code></a> allows all classes and modules to add new documentation to previously created classes.</p>

<p>If a class was ignored (via stopdoc) then reopened later with additional documentation it should be displayed.  If a class was ignored and never reopened it should not be displayed.  The ignore flag allows this to occur.</p>

                              <div class="method-source-code" id="ignore-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 274</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">ignore</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>

  <span class="ruby-ivar">@ignored</span> = <span class="ruby-keyword">true</span>

  <span class="ruby-identifier">stop_doc</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-ignored-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">ignored?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Has this class been ignored?</p>

<p>See also <a href="CodeObject.html#method-i-ignore"><code>ignore</code></a></p>

                              <div class="method-source-code" id="ignored-3F-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 287</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">ignored?</span>
  <span class="ruby-ivar">@ignored</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-options" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">options</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>The options instance from the store this <a href="CodeObject.html"><code>CodeObject</code></a> is attached to, or a default options instance if the <a href="CodeObject.html"><code>CodeObject</code></a> is not attached.</p>

<p>This is used by Text#snippet</p>

                              <div class="method-source-code" id="options-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 297</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">options</span>
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@store</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">rdoc</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">rdoc</span>.<span class="ruby-identifier">options</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Options</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parent</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Our parent <a href="CodeObject.html"><code>CodeObject</code></a>.  The parent may be missing for classes loaded from legacy RI data stores.</p>

                              <div class="method-source-code" id="parent-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 309</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parent</span>
  <span class="ruby-keyword">return</span> <span class="ruby-ivar">@parent</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parent</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@parent_name</span>

  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parent_class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">TopLevel</span> <span class="ruby-keyword">then</span>
    <span class="ruby-ivar">@parent</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">add_file</span> <span class="ruby-ivar">@parent_name</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-ivar">@parent</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">find_class_or_module</span> <span class="ruby-ivar">@parent_name</span>

    <span class="ruby-keyword">return</span> <span class="ruby-ivar">@parent</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@parent</span>

    <span class="ruby-keyword">begin</span>
      <span class="ruby-ivar">@parent</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">load_class</span> <span class="ruby-ivar">@parent_name</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingFileError</span>
      <span class="ruby-keyword">nil</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parent_file_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parent_file_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>File name of our parent</p>

                              <div class="method-source-code" id="parent_file_name-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 331</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parent_file_name</span>
  <span class="ruby-ivar">@parent</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@parent</span>.<span class="ruby-identifier">base_name</span> <span class="ruby-operator">:</span> <span class="ruby-string">&#39;(unknown)&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parent_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parent_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Name of our parent</p>

                              <div class="method-source-code" id="parent_name-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 338</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parent_name</span>
  <span class="ruby-ivar">@parent</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@parent</span>.<span class="ruby-identifier">full_name</span> <span class="ruby-operator">:</span> <span class="ruby-string">&#39;(unknown)&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-record_location" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">record_location</span><span
                                class="method-args">(top_level)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Records the <a href="TopLevel.html"><code>RDoc::TopLevel</code></a> (file) where this code object was defined</p>

                              <div class="method-source-code" id="record_location-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 345</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">record_location</span> <span class="ruby-identifier">top_level</span>
  <span class="ruby-ivar">@ignored</span>    = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@suppressed</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@file</span>       = <span class="ruby-identifier">top_level</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-section" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">section</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>The section this <a href="CodeObject.html"><code>CodeObject</code></a> is in.  Sections allow grouping of constants, attributes and methods inside a class or module.</p>

                              <div class="method-source-code" id="section-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 355</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">section</span>
  <span class="ruby-keyword">return</span> <span class="ruby-ivar">@section</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@section</span>

  <span class="ruby-ivar">@section</span> = <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">add_section</span> <span class="ruby-ivar">@section_title</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">parent</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-start_doc" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">start_doc</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Enable capture of documentation unless documentation has been turned off by :enddoc:</p>

                              <div class="method-source-code" id="start_doc-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 365</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">start_doc</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@done_documenting</span>

  <span class="ruby-ivar">@document_self</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-ivar">@document_children</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-ivar">@ignored</span>    = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@suppressed</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-stop_doc" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">stop_doc</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Disable capture of documentation</p>

                              <div class="method-source-code" id="stop_doc-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 377</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">stop_doc</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>

  <span class="ruby-ivar">@document_self</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@document_children</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-store-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">store=</span><span
                                class="method-args">(store)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Sets the <code>store</code> that contains this <a href="CodeObject.html"><code>CodeObject</code></a></p>

                              <div class="method-source-code" id="store-3D-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 387</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">store=</span> <span class="ruby-identifier">store</span>
  <span class="ruby-ivar">@store</span> = <span class="ruby-identifier">store</span>

  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>

  <span class="ruby-keyword">if</span> <span class="ruby-value">:nodoc</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">visibility</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">initialize_visibility</span>
    <span class="ruby-ivar">@track_visibility</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-suppress" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">suppress</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Use this to suppress a <a href="CodeObject.html"><code>CodeObject</code></a> and all its children until the next file it is seen in or documentation is discovered.  A suppressed item with documentation will be displayed while an ignored item with documentation may not be displayed.</p>

                              <div class="method-source-code" id="suppress-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 404</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">suppress</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@track_visibility</span>

  <span class="ruby-ivar">@suppressed</span> = <span class="ruby-keyword">true</span>

  <span class="ruby-identifier">stop_doc</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-suppressed-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">suppressed?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Has this class been suppressed?</p>

<p>See also <a href="CodeObject.html#method-i-suppress"><code>suppress</code></a></p>

                              <div class="method-source-code" id="suppressed-3F-source">
            <pre><span class="ruby-comment"># File rdoc/code_object.rb, line 417</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">suppressed?</span>
  <span class="ruby-ivar">@suppressed</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

